import { axios } from '@/utils/request'

const api = {
  elrepo: '/examination/elrepo'
}

export function getElRepoList (parameter) {
  return axios({
    url: api.elrepo + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveElRepo (parameter) {
  console.log(parameter)
  return axios({
    url: api.elrepo + (parameter.code > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}


export function queryName (parameter) {
  return axios({
    url: api.elrepo + '/queryElRepo',
    method: 'get',
    params: parameter
  })
}

export function delElRepo (parameter) {
  return axios({
    url: api.elrepo + '/remove',
    method: 'post',
    params: parameter
  })
}

export const repoExport = api.elrepo + '/export'
